import req from '@/lib/axios'
const $API = '/api'


//商品列表分页
const pagingItem = data => req.post(
  `${$API}/item/pagingItem`,
  data
);

//获取商品详情
const getItemDetail = data => req.post(
  `${$API}/item/getItemDetail`,
  data
);

//编辑商品详情
const editItem = data => req.post(
  `${$API}/item/editItem`,
  data
);

//新增商品
const addItem = data => req.post(
  `${$API}/item/addItem`,
  data
);

export default {
  pagingItem,
  getItemDetail,
  editItem,
  addItem,
}